﻿using BCCommon;
using BCCommon.TMS.FreightEnums;
using BCDto.Sim.Admin.Admin;
using BCDto.TMS.HorsemanFreightExtention;
using System.Collections.Generic;

namespace BCService.TMS.HorsemanFreightExtention
{
    public interface IHorsemanFreightExtentionService
    {
        /// <summary>
        /// 新增骑手运费扩展
        /// </summary>
        /// <param name="admin"></param>
        /// <param name="dto">骑手运费扩展</param>
        /// <returns></returns>
        int Add(AdminDto admin, HorsemanFreightExtentionRequestDto dto);

        /// <summary>
        /// 获取指定的骑手运费阶梯
        /// </summary>
        /// <param name="horsemanFreightExtentionId">骑手运费扩展Id</param>
        /// <returns></returns>
        HorsemanFreightExtentionDto GetByHorsemanFreightExtentionIdId(long horsemanFreightExtentionId);

        /// <summary>
        /// 更新骑手运费扩展信息
        /// </summary>
        /// <param name="horsemanFreightExtentionId">骑手运费扩展Id</param>
        /// <param name="dto">骑手运费扩展信息</param>
        /// <returns></returns>
        HorsemanFreightExtentionDto Update(long horsemanFreightExtentionId, HorsemanFreightExtentionPutDto dto);

        /// <summary>
        /// 根据区县编码获取骑手运费阶梯表
        /// </summary>
        /// <param name="countyCode">区县编码</param>
        /// <returns></returns>
        IEnumerable<HorsemanFreightExtentionDto> GetListByCountyCode(string countyCode);

        /// <summary>
        /// 获取骑手运费阶梯（分页）
        /// </summary>
        /// <param name="admin">当前登录人员</param> 
        /// <param name="isBase">是否是基础运费</param>     
        /// <param name="countyCode">区县编码</param>
        /// <param name="freightExtentionType">阶梯运费类型</param>
        /// <param name="ascending">是否升序排序</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="pageIndex">当前页</param>
        /// <param name="pageSize">每页条数</param>
        PageableList<HorsemanFreightExtentionViewDto> GetList(AdminDto admin, bool? isBase, string countyCode, HorsemanFreightExtentionType? freightExtentionType, bool? ascending, string sortName, int pageIndex, int pageSize);
        /// <summary>
        /// 批量更新骑手运费阶梯信息
        /// </summary>
        /// <param name="admin">当前登录人员</param>
        /// <param name="countyCode">区县编码</param>
        /// <param name="dto">阶梯运费信息</param>
        /// <returns></returns>
        bool BatchUpdate(AdminDto admin, string countyCode, HorsemanFreightExtentionBatchPutDto dto);
    }
}
